<div id="tb" style="padding:5px;">
	<div>
		<!--${action.getText('scheduler.refresh.title')}: 
		<select id="refresh_status_sec" class="easyui-combobox"  panelHeight="auto" style="width:100px">
			<option value="10">10${action.getText('scheduler.refresh.sec')}</option>
			<option value="5">5${action.getText('scheduler.refresh.sec')}</option>
			<option value="2">2${action.getText('scheduler.refresh.sec')}</option>
		</select> 定时刷新有问题，先禁用-->
		<a href="javascript:refresh();" class="easyui-linkbutton" iconCls="icon-reload">${action.getText('scheduler.refresh.immediately')}</a>
	</div>
</div>
<table id="scheduler_status_datagrid" data-options="toolbar:'#tb'" ></table>
<script type="text/javascript">
var sec = 1000*10;
$(function(){
	$('#scheduler_status_datagrid').datagrid({
		width:'auto',
		height:'auto',
		nowrap: false,
		fit:true,
		fitColumns:true,
		striped: true,
		url:'${request.contextPath}${namespace?default('')}/mp/sysres/scheduler-status_grid.json',
		sortName: 'id',
		sortOrder: 'desc',
		remoteSort: true,
		singleSelect : true,
		idField:'code',
		columns:[[
					{field:'threadName',title:'Thread Name',width:350,align:'center'},
					{field:'threadState',title:'Thread State',width:100,align:'center'}
				]],
		rownumbers:true
	});
	
	/*$('#refresh_status_sec').combobox({
		onSelect:function(rec){
			sec = parseInt(rec.value)*1000;
		}
	})*/
});

function refresh(){
	$('#scheduler_status_datagrid').datagrid('reload');
}

/*window.setInterval(function() {
	refresh();
}, sec);*/
</script>	